<?php
include(dirname(__FILE__).'/../../../includes.php5');
include_once($project_path.'/class/user/user.class.php5');
include($project_path.'/class/fw/listGroupData.php5');

session_start();
include_once($project_path.'/class/fw/dictionary.class.php5');

$lg = fwListGroup::get($_REQUEST['id']);
if($lg == '')
{
	echo 'var ajax_return_data ="«!LISTGROUP_ERROR_IDLOST»";';
	die(); 
}

//userUser::checkSession();

$action=(isset($_GET['action'])?$_GET['action']:'');
switch($action)
{
	case 'load':
		echo $lg->formatJavascriptDatas(intval($_REQUEST['index']), intval($_REQUEST['length']));
		break;
	case 'sort':
		$lg->sortDatas($_REQUEST['field']);
		echo $lg->formatJavascriptDatas(intval($_REQUEST['index']), intval($_REQUEST['length']));
		break;
}
?>